<?php include_once('./header.html');?>
<div id="out">
    <div class="inside">
        <div class="box test">

            <h2>环境监测</h2>
            <table class="table table-border">
                <tr>
                    <th width="25%">坏境</th>
                    <th width="25%">最低配置</th>
                    <th width="25%">当前配置</th>
                    <th width="25%">是否符合</th>
                </tr>
                <?php foreach($php_env as $item){ ?>
                <tr>
                    <td><?php echo $item['name'];?></td>
                    <td><?php echo $item['low'];?></td>
                    <td><?php echo $item['cur'];?></td>
                    <td class="<?php echo $item['cla'];?>"><?php echo $item['can'];?></td>
                </tr>
                <?php }?>

            </table>

            <h2>目录权限</h2>
            <table class="table table-border env">
                <tr>
                    <th width="25%">坏境</th>
                    <th width="25%">最低配置</th>
                    <th width="25%">当前配置</th>
                    <th width="25%">是否符合</th>
                </tr>
                <?php foreach($writable as $item){ ?>
                <tr>
                    <td><?php echo $item['name'];?></td>
                    <td><?php echo $item['low'];?></td>
                    <td><?php echo $item['cur'];?></td>
                    <td class="<?php echo $item['cla'];?>"><?php echo $item['can'];?></td>
                </tr>
                <?php }?>

            </table>
            <p class="agree">
                <a class="btn btn-primary" href="<?php echo $prev;?>">上一步</a>
                <a class="btn btn-success" href="javascript:;" onclick="envClick()">下一步</a>
            </p>

            <script>
                var len = Number('<?php echo $len?>');
                function envClick(){
                    if($('.yes').length != len){
                        swal({
                            text: "您的配置或权限不符合要求",
                            icon: "warning",
                        });
                    }else{
                        location.href='<?php echo $create?>';
                    }
                }
            </script>
        </div>
    </div>
</div>

</body>
</html>
